const Controller = require('../../core/controller/ApiController');
const {Route, HttpGet,HttpPost, Middleware, filters} = require('../../../plugin/egg-decorator-router/lib');
const {ExceptionHandler} = require('../../../plugin/egg-controller-exception-handler/lib');

@Route('/api/miniapp/common')
class CommonCtrl extends Controller {

    //获取开发团队
    @HttpGet('/develop')
    @ExceptionHandler()
    async getDevelop() {
        this.result.data = await this.service.miniapp.common.main.getDevelop();
        return '查询成功'
    }

    //获取版本信息
    @HttpGet('/version')
    @ExceptionHandler()
    async getVersion() {
        this.result.data = await this.service.miniapp.common.main.getVersion();
        return '查询成功'
    }

    //获取APPID
    @HttpGet('/open')
    @ExceptionHandler()
    async getInfo() {
        this.result.data = await this.service.miniapp.common.main.getInfo();
        return '查询成功'
    }
}
module.exports = CommonCtrl;
